#左下九九乘法表
x1=1
while x1<=9:
	y1=1
	while y1<=x1:
		print('{}*{}={}\t'.format(y1,x1,y1*x1),end=(''))
		y1+=1
	x1+=1
	print()
print('='*70)

#左上九九乘法表
x2=1
while x2<=9:
	y2=1
	while y2<=10-x2:
		print('{}*{}={}\t'.format(y2,10-x2,y2*(10-x2)),end=(''))
		y2+=1
	x2+=1
	print()
print('='*70)

#右下九九乘法表
x3=1
while x3<=9:
	y3=1
	k=1
	while k<=9-x3:
		print(end=('        '))
		k+=1
	while y3<=x3:
		print('{}*{}={}\t'.format(x3+1-y3,x3,(x3+1-y3)*x3),end=(''))
		y3+=1
	x3+=1
	print()
print('='*70)

#右上九九乘法表
x4=1
while x4<=9:
	y4=1
	k=1
	while k<x4:
		print(end=('        '))
		k+=1
	while y4<=10-x4:
		print('{}*{}={}\t'.format(11-x4-y4,10-x4,(11-x4-y4)*(10-x4)),end=(''))
		y4+=1
	x4+=1
	print()
print('='*70)